<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="common.css" rel="stylesheet">
    <script src="vue.min.js"></script>
</head>
<body>
<div id="div1">
    <input v-on:keyup.13="onKeyup13" />
    <input v-on:keyup.left="onKeyupLeft" />
    <br>
    <input v-model="msg1">
    <p>应该是keyup就更新值{{msg1}}</p>
    <input v-model.lazy="msg2">
    <p>失去焦点后才更新值{{msg2}}</p>
</div>
<script>
    var vm = new Vue({
        el : "#div1",
        data : {
            msg1 : "",
            msg2 : ""
        },
        methods : {
            onKeyup13 : function () {
                alert("回车键");
            },
            onKeyupLeft : function () {
                alert("左方向键");
            }
        }
    })
</script>
</body>
</html>